package it.univaq.mwt.common.business;

import it.univaq.mwt.business.CategoryService;
import it.univaq.mwt.business.ServicesService;



public abstract class CategoryServiceFactory {
	
	private static CategoryServiceFactory instance;	
	
	public abstract ServicesService getServicesService();	

	protected CategoryServiceFactory() {
	}
	
	public synchronized static CategoryServiceFactory getInstance() {
		if (instance==null) {
			throw new RuntimeException();
		}
		return instance;
	}
	

	public synchronized static void setInstance(CategoryServiceFactory factory) {
		if (instance!=null) {
			throw new RuntimeException();
		}
		instance = factory;
		
	}

	public CategoryService getCategoryService() {
		// TODO Auto-generated method stub
		return null;
	}
}
